<?php /*a:3:{s:64:"D:\phpstudy_pro\WWW\git\DSMall\app\admin\view\voucher\index.html";i:1591845923;s:64:"D:\phpstudy_pro\WWW\git\DSMall\app\admin\view\public\header.html";i:1591845922;s:69:"D:\phpstudy_pro\WWW\git\DSMall\app\admin\view\public\admin_items.html";i:1591845922;}*/ ?>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>DSMall<?php echo htmlentities(lang('system_backend')); ?></title>
        <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
        <link rel="stylesheet" href="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/css/admin.css">
        <link rel="stylesheet" href="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.css">
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery-2.1.4.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.validate.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/jquery.cookie.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/common.js"></script>
        <script src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/admin.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery-ui.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/js/jquery-ui/jquery.ui.datepicker-zh-CN.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/perfect-scrollbar.min.js"></script>
        <script src="<?php echo htmlentities(PLUGINS_SITE_ROOT); ?>/layer/layer.js"></script>
        <script type="text/javascript">
            var BASESITEROOT = "<?php echo htmlentities(BASE_SITE_ROOT); ?>";
            var ADMINSITEROOT = "<?php echo htmlentities(ADMIN_SITE_ROOT); ?>";
            var BASESITEURL = "<?php echo htmlentities(BASE_SITE_URL); ?>";
            var HOMESITEURL = "<?php echo htmlentities(HOME_SITE_URL); ?>";
            var ADMINSITEURL = "<?php echo htmlentities(ADMIN_SITE_URL); ?>";
        </script>
    </head>
    <body>
        <div id="append_parent"></div>
        <div id="ajaxwaitid"></div>







<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3><?php echo htmlentities(lang('ds_voucher_price_manage')); ?></h3>
                <h5></h5>
            </div>
            <?php if($admin_item): ?>
<ul class="tab-base ds-row">
    <?php if(is_array($admin_item) || $admin_item instanceof \think\Collection || $admin_item instanceof \think\Paginator): if( count($admin_item)==0 ) : echo "" ;else: foreach($admin_item as $key=>$item): ?>
    <li><a href="<?php echo htmlentities($item['url']); ?>" <?php if($item['name'] == $curitem): ?>class="current"<?php endif; ?>><span><?php echo htmlentities($item['text']); ?></span></a></li>
    <?php endforeach; endif; else: echo "" ;endif; ?>
</ul>
<?php endif; ?>
        </div>
    </div>

    <form method="get" name="formSearch">
        <div class="ds-search-form">
            <dl>
                <dt><?php echo htmlentities(lang('ds_store_name')); ?></dt>
                <dd><input type="text" value="<?php echo htmlentities(app('request')->get('store_name')); ?>" name="store_name" id="store_name" class="txt" style="width:100px;"></dd>
            </dl>
            <dl>
                <dt><?php echo htmlentities(lang('admin_voucher_template_adddate')); ?></dt>
                <dd>
                    <input type="text" id="sdate" name="sdate" class="txt date" value="<?php echo htmlentities(app('request')->get('sdate')); ?>">~
                    <input type="text" id="edate" name="edate" class="txt date" value="<?php echo htmlentities(app('request')->get('edate')); ?>">
                </dd>
            </dl>
            <dl>
                <dt><?php echo htmlentities(lang('ds_state')); ?></dt>
                <dd>
                    <select name="state">
                        <option value="0"
                         <?php if(app('request')->get('state') == '0'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('ds_status')); ?></option>
                        <?php if(!(empty($templatestate_arr) || (($templatestate_arr instanceof \think\Collection || $templatestate_arr instanceof \think\Paginator ) && $templatestate_arr->isEmpty()))): if(is_array($templatestate_arr) || $templatestate_arr instanceof \think\Collection || $templatestate_arr instanceof \think\Paginator): if( count($templatestate_arr)==0 ) : echo "" ;else: foreach($templatestate_arr as $key=>$val): ?>
                        <option value="<?php echo htmlentities($val['0']); ?>" <?php if($val['0'] == app('request')->get('state')): ?>selected<?php endif; ?>><?php echo htmlentities($val['1']); ?></option>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                        <?php endif; ?>
                    </select>
                </dd>
            </dl>
            <dl>
                <dt><?php echo htmlentities(lang('ds_recommend')); ?></dt>
                <dd>
                    <select name="recommend">
                        <option value="" selected><?php echo htmlentities(lang('ds_please_choose')); ?></option>
                        <option value="1" <?php if(app('request')->get('recommend') == '1'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('ds_yes')); ?></option>
                        <option value="0" <?php if(app('request')->get('recommend') == '0'): ?>selected<?php endif; ?>><?php echo htmlentities(lang('ds_no')); ?></option>
                    </select>
                </dd>
            </dl>
            <div class="btn_group">
                <a href="javascript:document.formSearch.submit();" class="btn" title="<?php echo htmlentities(lang('ds_query')); ?>"><?php echo htmlentities(lang('ds_query')); ?></a>
                <a href="<?php echo url('Voucher/index'); ?>" class="btn btn-default" title="<?php echo htmlentities(lang('ds_cancel')); ?>"><?php echo htmlentities(lang('ds_cancel')); ?></a>
            </div>
        </div>
    </form>
    <!-- 帮助 -->
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="<?php echo htmlentities(lang('ds_explanation_tip')); ?>"><?php echo htmlentities(lang('ds_explanation')); ?></h4>
            <span id="explanationZoom" title="<?php echo htmlentities(lang('ds_explanation_close')); ?>" class="arrow"></span>
        </div>
        <ul>
            <li><?php echo htmlentities(lang('admin_voucher_template_list_tip')); ?></li>
        </ul>
    </div>
    
    
    <!-- 列表 -->
    <form id="list_form" method="post">
        <table class="ds-default-table">
            <thead>
            <tr class="thead">
                <th class="w24">&nbsp;</th>
                <th class="align-left"><span><?php echo htmlentities(lang('ds_store_name')); ?></span></th>
                <th class="align-left"><span><?php echo htmlentities(lang('admin_voucher_template_title')); ?></span></th>
                <th class="align-center"><span><?php echo htmlentities(lang('admin_voucher_template_price')); ?></span></th>
                <th class="align-center"><span><?php echo htmlentities(lang('admin_voucher_template_orderpricelimit')); ?></span></th>
                <th class="align-center"><span><?php echo htmlentities(lang('admin_voucher_template_enddate')); ?></span></th>
                <th class="align-center"><span><?php echo htmlentities(lang('admin_voucher_template_adddate')); ?></span></th>
                <th class="align-center"><span><?php echo htmlentities(lang('ds_state')); ?></span></th>
                <th class="align-center"><?php echo htmlentities(lang('ds_recommend')); ?></th>
                <th class="align-center"><span><?php echo htmlentities(lang('ds_handle')); ?></span></th>
            </tr>
            </thead>
            <tbody id="treet1">
            <?php if(!(empty($vouchertemplate_list) || (($vouchertemplate_list instanceof \think\Collection || $vouchertemplate_list instanceof \think\Paginator ) && $vouchertemplate_list->isEmpty()))): if(is_array($vouchertemplate_list) || $vouchertemplate_list instanceof \think\Collection || $vouchertemplate_list instanceof \think\Paginator): if( count($vouchertemplate_list)==0 ) : echo "" ;else: foreach($vouchertemplate_list as $key=>$val): ?>
            <tr class="hover">
                <td>&nbsp;</td>
                <td class="align-left">
                    <a href="<?php echo url('home/Store/index',['store_id'=>$val['vouchertemplate_store_id']]); ?>"><span><?php echo htmlentities($val['vouchertemplate_storename']); ?></span></a>
                    <?php if(isset($flippedOwnShopIds[$val['vouchertemplate_store_id']])): ?>
                    <span class="ownshop">[<?php echo htmlentities(lang('ds_ownshop')); ?>]</span>
                    <?php endif; ?>
                </td>
                <td class="align-left"><span><?php echo htmlentities($val['vouchertemplate_title']); ?></span></td>
                <td class="align-center"><span><?php echo htmlentities($val['vouchertemplate_price']); ?></span></td>
                <td class="align-center"><span><?php echo htmlentities($val['vouchertemplate_limit']); ?></span></td>
                <td class="align-center"><span><?php echo htmlentities(date("Y-m-d",!is_numeric($val['vouchertemplate_enddate'])? strtotime($val['vouchertemplate_enddate']) : $val['vouchertemplate_enddate'])); ?></span></td>
                <td class="align-center"><span><?php echo htmlentities(date("Y-m-d",!is_numeric($val['vouchertemplate_adddate'])? strtotime($val['vouchertemplate_adddate']) : $val['vouchertemplate_adddate'])); ?></span></td>
                <td class="align-center">
                    <span>
                    <?php if(is_array($templatestate_arr) || $templatestate_arr instanceof \think\Collection || $templatestate_arr instanceof \think\Paginator): if( count($templatestate_arr)==0 ) : echo "" ;else: foreach($templatestate_arr as $key=>$v): if($val['vouchertemplate_state'] == $v['0']): ?><?php echo htmlentities($v['1']); ?><?php endif; ?>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                    </span>
                </td>
                <td class="align-center yes-onoff">
                    <?php if($val['vouchertemplate_recommend'] == '0'): ?>
                    <a href="JavaScript:void(0);" class="disabled" ajax_branch='vouchertemplate_recommend' ds_type="inline_edit" fieldname="vouchertemplate_recommend" fieldid="<?php echo htmlentities($val['vouchertemplate_id']); ?>" fieldvalue="0" title="<?php echo htmlentities(lang('ds_editable')); ?>"><img src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/transparent.gif"></a>
                    <?php else: ?>
                    <a href="JavaScript:void(0);" class="enabled" ajax_branch='vouchertemplate_recommend' ds_type="inline_edit" fieldname="vouchertemplate_recommend" fieldid="<?php echo htmlentities($val['vouchertemplate_id']); ?>" fieldvalue="1" title="<?php echo htmlentities(lang('ds_editable')); ?>"><img src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/images/treetable/transparent.gif"></a>
                    <?php endif; ?></td>
                <td class="nowrap align-center">
                    <a href="<?php echo url('Voucher/templateedit',['tid'=>$val['vouchertemplate_id']]); ?>" class="dsui-btn-edit"><i class="iconfont"></i><?php echo htmlentities(lang('ds_edit')); ?></a>
                </td>
            </tr>
           <?php endforeach; endif; else: echo "" ;endif; else: ?>
            <tr class="no_data">
                <td colspan="16"><?php echo htmlentities(lang('ds_no_record')); ?></td>
            </tr>
            <?php endif; ?>
            </tbody>
        </table>
        <?php echo $show_page; ?>
    </form>

</div>
<script type="text/javascript" src="<?php echo htmlentities(ADMIN_SITE_ROOT); ?>/js/jquery.edit.js" charset="utf-8"></script>
<script language="javascript">
    $(function () {
        $('#sdate').datepicker({dateFormat: 'yy-mm-dd'});
        $('#edate').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>